// test for BDA by nightmare

var Nightmare = require("nightmare");
var nightmare = Nightmare({ show: true });

nightmare
  .goto("http://localhost:2333/#/") //test-project: https://github.com/fireswork/rebuild
  .type("input[type=text]", "wrongusername")
  .click("button[type=submit]")
  .wait(1000)
  .click(".first")
  .wait(500)
  .wait(1500)
  .click(".second")
  .wait(1000)
  .end(() => "test complete!!!!!")
  .then(result => {
    console.log(result);
    console.log(result);
    console.log(result);
  })
  .catch(function(error) {
    console.error("Search failed:", error);
  });
